﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site_druk.Master" AutoEventWireup="true" CodeBehind="produkty_druk.aspx.cs" Inherits="KsiazkaKucharska.WebForm4" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">




<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr height="60">
  <td align="center" valign="middle" class="nazwa">
  <asp:Label ID="Label5" runat="server" Text="Lista zakupów"></asp:Label>
    </td>
</tr>
<tr>
<td >

    
    <asp:GridView ID="ProduktyMenuGridView" runat="server" AllowPaging="False" HeaderStyle-CssClass="gridViewHeader"
        AllowSorting="False" AutoGenerateColumns="False" BackColor="White" 
        BorderColor="#999999" BorderStyle="None" BorderWidth="1px" CellPadding="3" 
        GridLines="none" Width="100%" 
        HeaderStyle-BackColor="#99CCFF">
<Columns>
         
            <asp:TemplateField HeaderText="Produkt">
                <ItemTemplate>
                    <asp:Label ID="Label1" runat="server" Text='<%# Bind("nazwa_produktu") %>'></asp:Label>
                </ItemTemplate>
                <ItemStyle CssClass="lista" />
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Jednostka">
                <ItemTemplate>
                    <asp:Label ID="Label2" runat="server" Text='<%# Bind("nazwa_jednostki") %>'></asp:Label>
                </ItemTemplate>
                <ItemStyle CssClass="lista" />
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Ilość">
                <ItemTemplate>
                    <asp:Label ID="Label3" runat="server" Text='<%# Bind("ilosc") %>'></asp:Label>
                </ItemTemplate>
                <ItemStyle CssClass="lista" />
            </asp:TemplateField>
            
        </Columns>
</asp:GridView>

</td>
</tr>
</table></body>
<script language="javascript">
    window.print();
</script>













    <asp:SqlDataSource ID="ProduktyPrzepisuDataSource" runat="server" 
        ConnectionString="<%$ ConnectionStrings:ksiazka_kucharskaConnectionString %>" 
        SelectCommand="SELECT sp.id_produktu, sp.id_jednostki, sp.ilosc, sp.id_przepisu, j.nazwa_jednostki, p.nazwa_produktu FROM skladniki_przepisu sp, produkty p , jednostki j WHERE sp.id_produktu = p.id_produktu and sp.id_jednostki = j.id_jednostki and id_przepisu = @id_przepisu">
        <SelectParameters>
            <asp:Parameter Name="id_przepisu" Type="Int32" />
        </SelectParameters>
    </asp:SqlDataSource>
</asp:Content>
